package com.example.weather.controller;

import com.example.weather.service.RedisService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class RedisController {
    @Autowired
    private RedisService redisService;

    @ResponseBody
    @RequestMapping("/cache")
    public String cache(){
        redisService.cacheWeatherData();
        return "success";
    }

}
